﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Frw
{
    public class BusinessClassBase<I, C> 
        where C : class, I
        where I : class
    {
        public ILogger Logger
        {
            get
            {
                return Frw.Logger.GetInstance();
            }
        }

        public IValidator Validator
        {
            get
            {
                return Frw.Validator.GetInstance();
            }
        }

        public BusinessClassBase()
        {
            //I ad = GenericClassFactory<I, C>.CreateInstance();
        }

        public static I GetInstance()
        {
            return GenericClassFactory<I, C>.CreateInstance();
        }

        public static I GetInstance(string resolvingName)
        {
            return GenericClassFactory<I, C>.CreateInstance(resolvingName);
        }

        public static I GetInstance(params object[] args)
        {
            return GenericClassFactory<I, C>.CreateInstance(args);
        }
    }
}
